package routers

import (
	"github.com/gin-gonic/gin"
	"go-0650-blog-grom/controller"
)

func CommunityRouter(r *gin.Engine) {
	communityRouters := r.Group("/community")
	{
		communityRouters.GET("/test", func(c *gin.Context) {
			c.String(200, "社区模块测试请求！")
		})

		// 获取分类社区列表
		communityRouters.GET("/list", controller.CommunityController{}.GetCommunityList)
		// 根据ID查找社区详情
		communityRouters.GET("/get_community", controller.CommunityController{}.GetCommunityDetail)
	}
}
